<script setup lang="ts">   
// ts 要写在script标签上方

// let name:string | number="test";
// let n:number=10;
// let list:string []=["a","b","c"];
// let obj:object={
//     a:1,
//     b:2
// }
// let fn=():string=>{

// }

//接口
interface BB{
    a:string,
    b:number
}
interface User{
    name:string,
    age:number,
    sex:'男'|'女',
    a?:any[],
    fn:()=>string
    b:BB
}

const user:User={
    name:'张三',
    age:20, 
    sex:'男'
    fn(){
        return 'hello'
    }
}

</script>
<template>
    <div>

    </div>
</template>